package com.project.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.project.bean.StudentBean;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface IStudentMapper extends BaseMapper<StudentBean> {
    public IPage<StudentBean> findByItem(Page page, @Param("name") String name, @Param("className") String className, @Param("room") String room);

    public StudentBean findById(@Param("id") Integer id);

    public Integer countByClass(Integer classId);

    public List<StudentBean> findByRoomId(@Param("id") Integer id);

    public Integer countByRoom(Integer roomId);
}
